 /* ===== ROOT ORIGINAL DEL JUEGO ===== */
      :root {
        --bg: #dddddd;
        --card: #ffffff;
        --border: #e0d9d0;
        --primary: #6b7fa3;
        --accent: #9b7ea8;
        --success: #5a9e7c;
        --warn: #c4894a;
        --danger: #b85c5c;
        --text: #2e2a26;
        --dim: #9e9485;
        --light: #faf8f5;
      }

      /* ===== ROOT DEL NUEVO MENÚ ===== */
      :root {
        --primary-color: rgba(1, 1, 1, 0.9);
        --secondary-color: #ff8c42;
        --accent-color: #ff6600;
        --light-color: #ffd8b5;
        --text-color: #333;
        --white: #ffffff;
        --black: #000000;
        --orange-gradient: linear-gradient(
          115deg,
          #ff6701,
          #ff9900,
          #fd640b,
          #ff8851,
          #ff9810,
          #ff7951
        );
        --success-color: #4caf50;
        --error-color: #f44336;
        --orange-bg: #b9b8b7;
      }

      /* ===== ESTILOS GENERALES ===== */
      * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        font-family: "Poppins", sans-serif;
      }

      body {
        background: var(--bg);
        min-height: 100vh;
        padding: 80px 1rem 3rem 1rem;
        color: var(--text);
      }

      /* ----- MENÚ FIJO ----- */
      .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background-color: rgba(1, 1, 1, 0.9);
        padding: 0 10%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border-bottom: 2px solid var(--secondary-color);
        transition: all 0.3s ease;
      }

      .logo {
        font-size: 28px;
        font-weight: 700;
        color: var(--white);
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        letter-spacing: 1px;
      }

      .navigation ul {
        list-style: none;
        margin: 0;
        padding: 0;
      }

      .header .navigation ul li {
        float: left;
        position: relative;
      }

      .header .navigation ul li a {
        font-size: 16px;
        font-weight: 500;
        color: var(--white);
        text-decoration: none;
        padding: 22px 20px;
        display: block;
        transition: all 0.3s ease;
      }

      .header .navigation ul li a:hover {
        background-color: var(--secondary-color);
        transform: translateY(-2px);
        color: var(--black);
      }

      #toggle,
      .header label {
        display: none;
        cursor: pointer;
      }

      .menu-icon {
        color: white;
        font-size: 28px;
      }

      @media (max-width: 950px) {
        .header label {
          display: initial;
        }
        .header {
          padding: 15px 10%;
        }
        .header .navigation {
          position: absolute;
          top: 100%;
          left: 0;
          right: 0;
          background: var(--primary-color);
          display: none;
          border-radius: 0 0 12px 12px;
        }
        .header .navigation ul li {
          width: 100%;
        }
        #toggle:checked ~ .navigation {
          display: block;
        }
      }

      /* ===== ESTILOS DEL JUEGO ===== */
      header {
        text-align: center;
        margin-bottom: 2rem;
      }

      .tag {
        display: inline-block;
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: var(--dim);
        border: 1.5px solid var(--border);
        padding: 3px 12px;
        border-radius: 50px;
        margin-bottom: 0.6rem;
      }

      h1 {
        font-size: clamp(1.6rem, 4vw, 2.4rem);
        font-weight: 900;
        color: var(--text);
      }
      h1 span {
        color: var(--primary);
      }

      .subtitle {
        color: var(--dim);
        font-size: 0.85rem;
        margin-top: 0.3rem;
      }

      /* HUD */
      .hud {
        display: flex;
        justify-content: center;
        gap: 3rem;
        margin-bottom: 1.2rem;
      }
      .hud-box {
        text-align: center;
      }
      .hud-label {
        font-size: 0.6rem;
        font-weight: 700;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: var(--dim);
        display: block;
      }
      .hud-val {
        font-size: 2rem;
        font-weight: 900;
        color: var(--primary);
        line-height: 1;
      }
      .hud-val.success {
        color: var(--success);
      }

      /* Progress dots */
      .dots {
        display: flex;
        justify-content: center;
        gap: 5px;
        margin-bottom: 1.5rem;
      }
      .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--border);
        transition: background 0.3s;
      }
      .dot.done {
        background: var(--success);
      }
      .dot.fail {
        background: var(--danger);
      }

      /* EXERCISE CARD */
      .exercise {
        max-width: 860px;
        margin: 0 auto;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
      }

      .ex-header {
        background: var(--light);
        padding: 0.9rem 1.8rem;
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--dim);
        letter-spacing: 2px;
        text-transform: uppercase;
        border-bottom: 1px solid var(--border);
      }

      .instr {
        padding: 0.65rem 1.8rem;
        font-size: 0.8rem;
        color: var(--dim);
        background: #fdfcfa;
        border-bottom: 1px solid var(--border);
        text-align: center;
      }
      .instr strong {
        color: var(--primary);
      }

      .cols {
        display: grid;
        grid-template-columns: 1fr 1fr;
      }
      .col {
        padding: 1.1rem 1.3rem;
      }
      .col:first-child {
        border-right: 1px solid var(--border);
      }
      .col-title {
        font-size: 0.6rem;
        font-weight: 700;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: var(--dim);
        margin-bottom: 0.8rem;
        padding-bottom: 0.4rem;
        border-bottom: 1px solid var(--border);
      }

      /* Rows */
      .s-row {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.55rem 0.7rem;
        border-radius: 8px;
        margin-bottom: 0.35rem;
        border: 1.5px solid transparent;
        transition: all 0.18s;
        min-height: 48px;
        cursor: pointer;
      }

      .s-row:hover:not(.matched) {
        background: #f5f3ef;
        border-color: var(--border);
      }
      .s-row.selected {
        background: #edf0f8;
        border-color: var(--primary);
      }
      .s-row.matched {
        cursor: default;
      }

      /* Clases de color por pareja (12 colores pastel) */
      .match-0 {
        background: #f8e0e0;
        border-color: #e6b8b8;
      }
      .match-1 {
        background: #e0f0e0;
        border-color: #b8d9b8;
      }
      .match-2 {
        background: #e0e0f8;
        border-color: #b8b8e6;
      }
      .match-3 {
        background: #f8f0d8;
        border-color: #e6d8a8;
      }
      .match-4 {
        background: #f0d8f8;
        border-color: #d8b8e6;
      }
      .match-5 {
        background: #d8f0f0;
        border-color: #a8d8d8;
      }
      .match-6 {
        background: #f8d8d0;
        border-color: #e6c0b8;
      }
      .match-7 {
        background: #d0f0d8;
        border-color: #b0d8b8;
      }
      .match-8 {
        background: #d8d8f0;
        border-color: #b8b8d8;
      }
      .match-9 {
        background: #f8e8c0;
        border-color: #e6d0a0;
      }
      .match-10 {
        background: #e8d0f0;
        border-color: #d0b0d8;
      }
      .match-11 {
        background: #c0f0e8;
        border-color: #a0d8d0;
      }

      .s-row.wrong-flash {
        background: #fdf0f0;
        border-color: #e8b4b4;
        animation: shake 0.3s;
      }

      @keyframes shake {
        0%,
        100% {
          transform: translateX(0);
        }
        25% {
          transform: translateX(-5px);
        }
        75% {
          transform: translateX(5px);
        }
      }

      .num {
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: var(--border);
        color: var(--dim);
        font-size: 0.72rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: all 0.2s;
      }

      .s-row.selected .num {
        background: var(--primary);
        color: #fff;
      }
      .s-row.matched .num {
        background: var(--success);
        color: #fff;
      }

      .s-text {
        font-size: 0.83rem;
        font-weight: 600;
        line-height: 1.35;
        flex: 1;
        color: var(--text);
      }

      .s-row.matched .s-text {
        color: var(--text);
      } /* lo dejamos normal para que resalte el color de fondo */

      .check {
        font-size: 0.75rem;
        color: var(--success);
        opacity: 0;
        transition: opacity 0.3s;
        flex-shrink: 0;
      }
      .s-row.matched .check {
        opacity: 1;
      }

      /* Bottom bar */
      .bottom-bar {
        padding: 0.9rem 1.8rem;
        border-top: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.6rem;
        background: var(--light);
      }

      .score-text {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--dim);
      }
      .score-text span {
        color: var(--primary);
        font-size: 1.1rem;
      }

      .btn {
        border: none;
        border-radius: 50px;
        padding: 0.5rem 1.3rem;
        font-family: "Poppins", sans-serif;
        font-size: 0.8rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.18s;
      }

      .btn-outline {
        background: transparent;
        border: 1.5px solid var(--border);
        color: var(--dim);
      }
      .btn-outline:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: #f0f3fa;
      }
      .btn-outline:disabled {
        opacity: 0.3;
        pointer-events: none;
      }

      .btn-fill {
        background: var(--primary);
        color: white;
      }
      .btn-fill:hover {
        background: #5a6e92;
        transform: translateY(-1px);
      }

      /* End screen */
      .end-screen {
        display: none;
        text-align: center;
        padding: 3rem 2rem;
      }
      .end-screen.show {
        display: block;
      }
      .end-emoji {
        font-size: 3.5rem;
        margin-bottom: 0.5rem;
      }
      .end-title {
        font-size: clamp(1.8rem, 5vw, 2.8rem);
        font-weight: 900;
        color: var(--text);
        margin-bottom: 0.4rem;
      }
      .end-info {
        color: var(--dim);
        font-size: 0.9rem;
        margin-bottom: 1.8rem;
        line-height: 2.2;
      }
      .end-info strong {
        color: var(--text);
      }

      @media (max-width: 560px) {
        .cols {
          grid-template-columns: 1fr;
        }
        .col:first-child {
          border-right: none;
          border-bottom: 1px solid var(--border);
        }
        .hud {
          gap: 1.5rem;
        }
      }